package com.dong.mapper;

import com.dong.pojo.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;



import java.util.List;

@Mapper
@Repository
public interface BookMapper {

    //查询所有图书
    List<Book> selectAllBook();

    //插入一本书
    int insertBook(Book book);

    //根据id查找一本书
    Book selectBookById(@Param("bookId") int bookId);

    //更改图书
    int updateBook(Book book);

    //根据id删除图书
    int deleteBook(@Param("bookId") int bookId);

    //搜索图书
    List<Book> selectLike(String keyword);
}
